import React from 'react';
import { NodeMenu, EdgeMenu, GroupMenu, MultiMenu, CanvasMenu, ContextMenu } from 'gg-editor';
import MenuItem from './MenuItem';
import styles from './index.less';

const FlowContextMenu = props => {
  return (
    <ContextMenu className={styles.contextMenu}>
      <NodeMenu>
        {/*<MenuItem command="copy" text="复制" />*/}
        <MenuItem command="delete" text="删除模块" />

        <MenuItem
          command="editCommand"
          text="编辑模块"
          icon="edit"
          disabled={props.type === 'end'}
        />
      </NodeMenu>
      <EdgeMenu>
        <MenuItem command="delete" text="删除边" />
      </EdgeMenu>
      <GroupMenu>
        {/*<MenuItem command="copy" text="复制" />*/}
        <MenuItem command="delete" text="删除组" />
        {/*<MenuItem command="unGroup" icon="ungroup" text="Ungroup" />*/}
      </GroupMenu>
      <MultiMenu>
        {/*<MenuItem command="copy" text="复制" />*/}
        {/*<MenuItem command="paste" text="粘贴" />*/}
        {/*<MenuItem command="addGroup" icon="group" text="Add Group" />*/}
        <MenuItem command="delete" text="删除组" />
      </MultiMenu>
      <CanvasMenu>
        <MenuItem command="undo" text="撤销" />
        <MenuItem command="redo" text="返回" />
        {/*<MenuItem command="pasteHere" icon="paste" text="Paste Here" />*/}
      </CanvasMenu>
    </ContextMenu>
  );
};

export default FlowContextMenu;
